import 'dart:convert';

import 'package:get/get.dart';
/// id : "1"
/// content : "cca"
/// time : 1000
/// rid : null

SimpleMessage simpleMessageFromJson(String str) => SimpleMessage.fromJson(json.decode(str));
String simpleMessageToJson(SimpleMessage data) => json.encode(data.toJson());
class SimpleMessage {
  SimpleMessage({
      String? id, 
      String? content, 
      int? time,
       String? rid, String? sid}){
    _id = id;
    _content = content;
    _time = time;
    _rid = rid;
    _sid = sid;
}

  SimpleMessage.fromJson(dynamic j) {
    _id = j['id'];
    _content = j['content'];
    _time = j['time'];
    _rid = j['rid'];
    _sid = j['sid'];
  }
  String? _id;
  String? _content;
  int? _time;
  String? _rid;
  String? _sid;

  String? get id => _id;
  String? get content => _content;
  int? get time => _time;
  String? get rid => _rid;
  String? get sid => _sid;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['id'] = _id;
    map['content'] = _content;
    map['time'] = _time;
    map['rid'] = _rid;
    map['sid'] = _sid;
    return map;
  }

}